home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / util / rexx / rmh.lha / rmh / examples / pconfig.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2000-11-28  |  393 b   |  18 lines

  1. /*
  2. usage of ParseConfig()
  3. */
  4.  
  5. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  6.  
  7. file=AddPart(PathPart(ProgramName("FULL")),ProgramName("NOEXT"))".conf"
  8.  
  9. lines=ParseConfig(file,"CONF")
  10. if lines==-1 then do
  11.     say "File '"file"' not found."
  12.     exit
  13. end
  14.  
  15. do i=0 to lines-1
  16.     say left("Real line:" i,14) left("line:" conf.i.line,9) left("Option:" conf.i,25) "Value:" conf.i.value
  17. end
  18.